#pragma once

#include "Enumerations\AlphaType.h"

#include "Enumerations\RenderPass.h"

#include "..\Math\Matrix4x4.h"

#include "Material.h"

#include "..\Actors\Actor.h"

class SceneNodeProperties
{
	friend class SceneNode;

	protected:

		ActorId _actorId;
		std::string	_name;
		Matrix4x4 _toWorld, _fromWorld;
		float _radius;
		RenderPass _renderPass;
		Material _material;
		AlphaType _alphaType;

		void SetAlpha(const float alpha) { _alphaType=AlphaMaterial; _material.SetAlpha(alpha); } 

	public:

		SceneNodeProperties();

		const ActorId &ActorId() const { return _actorId; }

		Matrix4x4 const &ToWorld() const { return _toWorld; }

		Matrix4x4 const &FromWorld() const { return _fromWorld; }

		void Transform(
			Matrix4x4 *toWorld, 
			Matrix4x4 *fromWorld) const;

		const char * Name() const { return _name.c_str(); }		

		bool HasAlpha() const { return _material.HasAlpha(); }						

		float Alpha() const { return _material.GetAlpha(); }

		AlphaType AlphaType() const { return _alphaType; }

		RenderPass RenderPass() const { return _renderPass; }

		float Radius() const { return _radius; }

		Material GetMaterial() const { return _material; }
};